<!DOCTYPE html>
<html lang="zh-Hans">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Canvas 绘制时钟</title>

    <style>
        div {
            text-align: center;
        }

        div img {
            margin-top: 50px;
            width: 400px;
        }

        #clock {
            border: 1px solid #ccc;
        }


        #note {
            width: 550px;
            margin: 0 auto;
        }

        .list {
            text-align: left;
            margin-bottom: 15px;
            color: #555;
            font-size: 20px;
        }

        #clock-div {
            margin-top: 50px;
            text-align: center;
        }
    </style>
</head>

<body>
    <div id='clock-div'>
        <canvas id="clock" width="300px" height="300px"></canvas>
    </div>

    <div><img src="img/分析需求.png" alt=""></div>

    <div id="note">
        <div class="list">
            <p> 一个圆的弧长(周长)=2πr </p>
            <p> 1° 的弧长=2πr/360 </p>
            <p>1° 的弧度=2π/360</p>
            <p>Math.sin(rad)返回弧度rad的正弦值</p>
            <p>Math.sin(30*2π/360)约为0.5</p>
            <p>正弦值 * 半径 = 对边的边长（y） y=Math.sin(rad) * r</p>
            <p>余弦值 * 半径 = 领边的边长（x）x=Math.cos(rad) * r </p>
        </div>
    </div>

    <script src="clock.js"></script>
</body>

</html>